﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

 
    public class Params
    {
        public Dictionary<string, string> data = new Dictionary<string, string>();

        public void Set(string key, string value)
        {
            if (data.ContainsKey(key))
            {
                data[key] = value;
            }
            else
            {
                data.Add(key, value);
            }
        }

        public string Get(string key)
        {
            if (data.ContainsKey(key))
            {
                return data[key];
            }
            return "";
        }

        /// <summary>
        /// 获取长度
        /// </summary>
        public int Count { get { return data.Count; } }

        /// <summary>
        /// 获取所有Key
        /// </summary>
        public List<string> getAllkey { get { return new List<string>(data.Keys); } }

    }
 